<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<link rel="stylesheet" href="../../../layui-v2.2.5/layui/css/layui.css" media="all">
<script src="../../../layui-v2.2.5/layui/layui.js" charset="utf-8"></script>

<div class="breadcrumbs" id="breadcrumbs">
    <script type="text/javascript">
        try {
            ace.settings.check('breadcrumbs', 'fixed')
        } catch (e) {
        }
    </script>

    <ul class="breadcrumb">
        <li><i class="icon-home home-icon"></i> <a href="../../../index.jsp">首页</a>
        </li>

        <li>合同列表</li>

    </ul>
    <!-- .breadcrumb -->


</div>


<div class="page-content">
    <div class="page-header">
        <h1>
            合同列表
        </h1>
    </div>
    <!-- /.page-header -->

    <div class="row">
        <div class="col-xs-12">
            <!-- PAGE CONTENT BEGINS -->

            <div class="row">
                <div class="col-xs-12">
                    <div class="table-responsive">

                        <form class="form-search" method="post" action="./fileListShow">
                            <div class="input-group" style="margin-left: 58%;">
                                <div class="layui-input-inline">
                                    <input type="text" name="createTimes" style="width: 120px;height: 30px;" id="date"
                                           lay-verify="date" placeholder="年-月-日 查询" autocomplete="off" class="layui-input">
                                </div>&nbsp;
                                <input type="text" name="file_name" style="width: 250px;height: 30px;"
                                       class="form-control" placeholder="合同名称查询">

                                <button type="submit" class="btn btn-purple btn-sm">
                                    查询
                                    <i class="icon-search icon-on-right bigger-110"></i>
                                </button>

                            </div>
                        </form>


                        <br>
                        <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                            <thead>
                            <tr>
                                <th style="width: 55px;text-align: center;">编号</th>
                                <th style="text-align: center;">合同名称</th>
                                <th style="width: 250px;text-align: center;">甲方</th>
                                <%--<th style="width: 140px;" text-align: center;>图片数量（张）</th>--%>
                                <th style="width: 250px;text-align: center;">乙方</th>
                                <th style="width: 110px;text-align: center;">签约日期</th>
                                <th style="width: 110px;text-align: center;">联系电话</th>
                                <th style="width: 180px;text-align: center;">操作</th>
                            </tr>
                            </thead>

                            <tbody>
                            <c:forEach items="${page.lists}" var="opp">
                                <tr>
                                    <td style="text-align: center;">
                                            ${opp.file_id}
                                    </td>
                                    <td style="text-align: center;">
                                        <a href="./pictureShow?file_id=${opp.file_id}" style="color: #1a67bd;"
                                           title="查看该组图片"><u>${opp.file_name}</u><i class="icon-link"></i></a>
                                    </td>
                                    <td style="text-align: center;">
                                            ${opp.file_enterprise}
                                    </td>
                                    <td style="text-align: center;">
                                            ${opp.file_Y}
                                    </td>

                                    <td style="text-align: center;">
                                            ${opp.createTimes}
                                    </td>
                                    <td style="text-align: center;">
                                       <%-- <span class="label label-sm label-success"></span>--%>
                                            ${opp.file_phone}
                                    </td>
                                    <td style="text-align: center;">
                                        <a href="./deleteFileAndPictures?file_id=${opp.file_id}" style="text-decoration:none;" onclick="return confirm('确认删除吗？');">
                                            <button class="btn btn-xs btn-danger">删除</button>
                                        </a>
                                        <a href="./addPicture?file_id=${opp.file_id}" style="text-decoration:none;">
                                            <button class="btn btn-xs btn-info">上传图片</button>
                                        </a>
                                        <a href="./getByIdFile?file_id=${opp.file_id}" style="text-decoration:none;">
                                            <button class="btn btn-xs btn-success">修改</button>
                                        </a>
                                    </td>
                                </tr>
                            </c:forEach>
                            </tbody>

                        </table>
                        <p style="color: #880000;font-size: 19px;text-align: center;">${noFile}</p>
                        <div class="meneame" style="margin-left: 38%;">${page.html}</div>

                        <div class="alert alert-success alert-dismissible mt10" role="alert">
                            <button type="button" class="close" data-dismiss="alert">
                                <span aria-hidden="true">×</span><span class="sr-only">Close</span>
                            </button>
                            <ul>
                                <li>提示：</li>
                                <li>排序：用户列表信息都是按照倒叙，从新创建往后依次排序。</li>
                                <li>合同图片查看：点击合同名称可以查看该组合同图片和下载图片。</li>
                            </ul>
                        </div>

                    </div>
                    <!-- /.table-responsive -->
                </div>
                <!-- /span -->
            </div>
            <!-- /row -->
        </div>
        <!-- /.col -->

    </div>
    <!-- /.row -->

</div>
<!-- /.page-content -->

<script>
    layui.use(['form', 'layedit', 'laydate'], function () {
        var form = layui.form
            , layer = layui.layer
            , layedit = layui.layedit
            , laydate = layui.laydate;

        //日期
        laydate.render({
            elem: '#date'
        });
        laydate.render({
            elem: '#date1'
        });


        //监听提交
        form.on('submit(demo1)', function (data) {
            layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })
            return false;
        });


    });
</script>
